﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BaseAddIn.ProjectInfo
{
    [Serializable]
    public sealed class RuleFilesList : List<RuleFile>
    {
        public RuleList FiltrarRules(string tipo)
        {
            RuleList retorno = new RuleList();

            foreach(RuleFile ruleFile in this)
            {
                foreach(Rule rule in ruleFile.Rules)
                {
                    if (tipo == rule.TipoRegra)
                        retorno.Add(rule);
                }
            }

            return retorno;
        }
    }
}
